//
//  FMDBDepartManager.h
//  NursingManage
//
//  Created by Zhen Huang on 17/5/16.
//  Copyright © 2017年 James. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HDepartModel.h"
#import <FMDB.h>
#import "HMailListModel.h"
#import "HJurisdictionModel.h"
#import "HSCDModel.h"
#import "HQcTypeModel.h"
#import "HQc_standardModel.h"
#import "HQc_codeModel.h"
#import "HQc_deptModel.h"
@interface FMDBDepartManager : NSObject
@property (nonatomic,retain)FMDatabase *db;

+ (FMDBDepartManager *)sharedFMDBManeger;
#pragma 创建科室排班
//1.创建数据库

- (void)dataDepartmentBase;

//2.创建表
- (void)createDepartmentTable;
//3.添加数据
- (void)insertHDepart:(HDepartModel *)HDepartModel;
//4.删除数据
- (void)deleteHDepart:(HDepartModel *)HDepartModel;
//5.更新数据
- (void)updateHDepart:(HDepartModel *)HDepartModel;
//6.查询数据
- (NSMutableArray *)DepartmentModel :(NSString *)string
                                    :(NSString *)week_begin
                                    :(NSString *)week_end;

#pragma 创建通讯录表
- (void)dataAllContactsBase;

- (void)createAllContactsTable;

- (void)insertAllContacts:(HMailListModel *)AllContactsModel;

- (void)deleteAllContacts:(HMailListModel *)AllContactsModel;

- (void)updateDog:(HMailListModel *)MailModel;

- (NSMutableArray *) AllContacts;

- (NSMutableArray *) AllContactsWithInputCode:(NSString *)input_code;

#pragma 创建科室排班（权限内）

- (void)dataJurisdictionBase;

- (void)createJurisdictionTable;

- (void)insertJurisdictionModel:(HJurisdictionModel *)HJDModel;

- (void)deleteJurisdictionModel:(HJurisdictionModel *)HJDModel;

- (void)updateHJD:(HJurisdictionModel *)HJDModel;

- (NSMutableArray *)Jurisdiction;


#pragma 创建个人排班
- (void)dataBaseSCD;

- (void)createTableSCD;

- (void)insertSCD:(HSCDModel *)HSCDModel;

- (void)deleteSCD:(HSCDModel *)HSCDModel;

- (void)updateSCD:(HSCDModel *)HSCDModel;

- (NSMutableArray *)allModelSCD :(NSString *)emp_id;
- (NSMutableArray *)allModelSCDWithdate :(NSString *)emp_id
                                SCD_date:(NSString *)SCD_date
                             SCD_EndDATE:(NSString *)SCD_EndDate;

#pragma 创建qc_type表

- (void)dataQc_type;

- (void)createQc_typeTable;

- (void)insertQc_type:(HQcTypeModel *)HQcTypeModel;

- (void)deleteQc_type:(HQcTypeModel *)HQcTypeModel;

- (void)updateQc_type:(HQcTypeModel *)HQcTypeModel;

- (NSMutableArray *)Qc_type;
- (NSInteger )QC_TypeCount;


#pragma 创建qc_standard表

- (void)dataQc_standard;

- (void)createQc_standardTable;

- (void)insertQc_standard:(HQc_standardModel *)HQcStandardModel;

- (void)deleteQc_standard:(HQc_standardModel *)HQcStandardModel;

- (void)updateQc_standard:(HQc_standardModel *)HQcStandardModel;

- (NSMutableArray *)Qc_standard :(NSString *)emp_id;


#pragma 创建qc_code表

- (void)dataQc_code;

- (void)createQc_codeTable;

- (void)insertQc_code:(HQc_codeModel *)HQc_codeModel;

- (void)deleteQc_code:(HQc_codeModel *)HQc_codeModel;

- (void)updateQc_code:(HQc_codeModel *)HQc_codeModel;

- (NSMutableArray *)Qc_code :(NSString *)emp_id;



#pragma 创建qc_code表

- (void)dataQc_dept;

- (void)createQc_deptTable;

- (void)insertQc_dept:(HQc_deptModel *)HQc_deptModel;

- (void)deleteQc_dept:(HQc_deptModel *)HQc_deptModel;

- (void)updateQc_dept:(HQc_deptModel *)HQc_deptModel;

- (NSMutableArray *)Qc_dept :(NSString *)emp_id;




@end
